﻿using System;
using System.Windows;
using Flux.Mvvm.ViewModels;

namespace Flux.Mvvm.Views
{
	public abstract class WindowView<T>
		: Window, IView<T>
		where T : IViewModel
	{
		public T ViewModel { get; set; }

		protected WindowView()
		{
			ViewModel = (T)Activator.CreateInstance(typeof(T));
			DataContext = ViewModel;
		}
	}
}